package dbmanager.struct;

import java.sql.Connection;

public abstract class DBConnectionType {
	private String name = "";
	private String targetUrl = "";
	private String userName = "";
	private String pwd = "";
	private int port = 0;
	private String driverName = "";
	private String startDatabase = "";
	private Connection connection;

	public abstract boolean connect();

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getTargetUrl() {
		return targetUrl;
	}

	public void setTargetUrl(String targetUrl) {
		this.targetUrl = targetUrl;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPwd() {
		return pwd;
	}

	public void setPwd(String pwd) {
		this.pwd = pwd;
	}

	public int getPort() {
		return port;
	}

	public void setPort(int port) {
		this.port = port;
	}

	public String getDriverName() {
		return driverName;
	}

	public void setDriverName(String driverName) {
		this.driverName = driverName;
	}

	public String getStartDatabase() {
		return startDatabase;
	}

	public void setStartDatabase(String startDatabase) {
		this.startDatabase = startDatabase;
	}

	public Connection getConnection() {
		return connection;
	}

	public void setConnection(Connection connection) {
		this.connection = connection;
	}

	@Override
	public String toString() {
		return getName();
	}

}
